package com.bleeth.flow.web.model;

import lombok.Data;
import xyz.erupt.annotation.Erupt;
import xyz.erupt.annotation.EruptField;
import xyz.erupt.annotation.fun.DataProxy;
import xyz.erupt.annotation.sub_field.Edit;
import xyz.erupt.annotation.sub_field.EditType;
import xyz.erupt.annotation.sub_field.View;
import xyz.erupt.annotation.sub_field.sub_edit.CodeEditorType;
import xyz.erupt.annotation.sub_field.sub_edit.Search;
import xyz.erupt.jpa.model.MetaModel;

import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * @author ：Bleeth
 * @date ：2022-05-16
 * @description：兴业数据管理模型
 */

@Erupt(name = "函数管理",
        dataProxy = FlowFunctionModel.class
)
@Entity
@Table(name = "flow_function")
@Data
public class FlowFunctionModel extends MetaModel implements DataProxy<FlowFunctionModel> {



    @EruptField(
            views = @View(title = "函数名称"),
            edit = @Edit(title = "函数名称",search = @Search(vague = true))
    )
    private String funcName;

    @EruptField(
            views = @View(title = "函数唯一标识"),
            edit = @Edit(title = "函数唯一标识",search = @Search(vague = true))
    )
    private String funcUid;

    @EruptField(
            views = @View(title = "函数描述"),
            edit = @Edit(title = "函数描述",search = @Search(vague = true))
    )
    private String funcDescription;

    @EruptField(
            views = @View(title = "函数内容"),
            edit = @Edit(title = "代码(aviator)", type = EditType.CODE_EDITOR,
                    codeEditType = @CodeEditorType(language = "aviator"))
    )
    private String funcContent;



}
